<?php
/**
  * CLOUD
  *
  * This is not a freeware, use is subject to license terms
  * @author CLOUD DEV TEAM
  * 
  */
if (!defined('IN_CLOUD')) exit('Access Denied!');

class Dir
{
	public static function deepMakeDir( $dir )
	{
		if ( file_exists( $dir ) )
	    {
	        if ( !file_exists( $dir . '/index.htm' ) )
	        {
	            file_put_contents( $dir . '/index.htm' , ' ' );
	            @chmod( $dir . '/index.htm' , 0777 );
	        }
	    }
	    else
	    {
	        self::deepMakeDir( dirname( $dir ) );
	        @mkdir( $dir , 0777 );
	        file_put_contents( $dir . '/index.htm', ' ' );
	        @chmod( $dir . '/index.htm' , 0777 );
	    }
	}
}